/*
** list_get.c for liblist in /home/guina_b/
** 
** Made by benoit guina
** Login   <guina_b@epitech.net>
** 
** Started on  Fri Jan 01 00:00:00 2010 benoit guina
** Last update Fri Jan 01 00:00:00 2010 benoit guina
*/

#include "list.h"

void	*list_get(void *l, int n)
{
  if (n < 0)
    return (0);
  while (n-- > 0)
    {
      if (!l)
	return (0);
      l = *(void **)l;
    }
  return (l);
}
